// Copyright 2022 Chen Jun
// Licensed under the MIT License.

#ifndef ARMOR_DETECTOR__ARMOR_HPP_
#define ARMOR_DETECTOR__ARMOR_HPP_



// STL
#include <algorithm>
#include <string>


//Tip:以下头文件的位置和顺序保证了pnp_solver.cpp中的cv2eigen可用，似乎是有调用关系
#include <eigen3/Eigen/Eigen>

#include <opencv2/core.hpp>
#include <opencv2/core/eigen.hpp>
namespace rm_auto_aim
{
const int RED = 0;
const int BLUE = 1;

enum class ArmorType { SMALL, LARGE, INVALID };

// 装甲板类型
const std::vector<std::string> class2name = {
    "BG", "B1", "B2", "B3", "B4", "B5", "BO", "BB",
    "RG", "R1", "R2", "R3", "R4", "R5", "RO", "RB"
};

struct Armor
{
  Armor() {
    armor_verticles_.resize(4);
  };
  std::vector<cv::Point2f> armor_verticles_; //装甲板四个角点,左上，左下，右下，右上
  cv::Point2f center;
  ArmorType type;

  // Net part
  int id_;
  float confidence_;
  std::string classfication_result_;
};

}  // namespace rm_auto_aim

#endif  // ARMOR_DETECTOR__ARMOR_HPP_
